package com.itheima.threadapidemo;

public class ThreadApiDemo2 {

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++){
            System.out.println(Thread.currentThread().getName() + ":" + i);
            try {
                // main线程休眠1秒
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
